package com.ruoyi.my.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.my.mapper.MyChildrenInfoMapper;
import com.ruoyi.my.domain.MyChildrenInfo;
import com.ruoyi.my.service.IMyChildrenInfoService;

/**
 * 儿女信息Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-10
 */
@Service
public class MyChildrenInfoServiceImpl implements IMyChildrenInfoService
{
    @Autowired
    private MyChildrenInfoMapper myChildrenInfoMapper;

    /**
     * 查询儿女信息
     *
     * @param id 儿女信息主键
     * @return 儿女信息
     */
    @Override
    public MyChildrenInfo selectMyChildrenInfoById(Long id)
    {
        return myChildrenInfoMapper.selectMyChildrenInfoById(id);
    }

    @Override
    public List<MyChildrenInfo> countSexNumber() {
        return myChildrenInfoMapper.countSexNumber();
    }

    /**
     * 查询儿女信息列表
     *
     * @param myChildrenInfo 儿女信息
     * @return 儿女信息
     */
    @Override
    public List<MyChildrenInfo> selectMyChildrenInfoList(MyChildrenInfo myChildrenInfo)
    {
        return myChildrenInfoMapper.selectMyChildrenInfoList(myChildrenInfo);
    }

    /**
     * 新增儿女信息
     *
     * @param myChildrenInfo 儿女信息
     * @return 结果
     */
    @Override
    public int insertMyChildrenInfo(MyChildrenInfo myChildrenInfo)
    {
        return myChildrenInfoMapper.insertMyChildrenInfo(myChildrenInfo);
    }

    /**
     * 修改儿女信息
     *
     * @param myChildrenInfo 儿女信息
     * @return 结果
     */
    @Override
    public int updateMyChildrenInfo(MyChildrenInfo myChildrenInfo)
    {
        return myChildrenInfoMapper.updateMyChildrenInfo(myChildrenInfo);
    }

    /**
     * 批量删除儿女信息
     *
     * @param ids 需要删除的儿女信息主键
     * @return 结果
     */
    @Override
    public int deleteMyChildrenInfoByIds(Long[] ids)
    {
        return myChildrenInfoMapper.deleteMyChildrenInfoByIds(ids);
    }

    /**
     * 删除儿女信息信息
     *
     * @param id 儿女信息主键
     * @return 结果
     */
    @Override
    public int deleteMyChildrenInfoById(Long id)
    {
        return myChildrenInfoMapper.deleteMyChildrenInfoById(id);
    }
}
